package impl;

import java.rmi.RemoteException;

public class ThreadServerImpl extends Thread {
	
	private ServerImpl serv;
	private boolean continuer = false;
	private String n_attacker;
	private String n_defender;
	
	public ThreadServerImpl(ServerImpl serv, String n_attacker, String n_defender) {
		this.serv = serv;
	}
	
	public void launchFight() {
		if (!this.continuer) {
			this.start();
			this.continuer = true;
		}
	}
	
	@Override
	public void run() {
		try {
			serv.fight_character(n_attacker, n_defender);
		} catch (RemoteException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}

}
